import 'package:flutter/material.dart';

import '../../widget/transparent_app_bar.dart';

abstract class CommonStatefulPage extends StatefulWidget {
  String title();

  Widget body();

  List<Widget>? actions();

  Widget? leading();

  const CommonStatefulPage({super.key});

  @override
  State<CommonStatefulPage> createState() => _CommonStatefulPageState();
}

class _CommonStatefulPageState extends State<CommonStatefulPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: TransparentAppBar(
        title: widget.title(),
        actions: widget.actions(),
        leading: widget.leading(),
      ),
      body: widget.body(),
    );
  }
}
